package org.convallaria.system.biz.exception;

/**
 * 用户业务异常
 * 
 * @author convallaria
 * @since 1.0.0
 */
public class UserBusinessException extends RuntimeException {
    
    private final String errorCode;
    
    public UserBusinessException(String message) {
        super(message);
        this.errorCode = "USER_ERROR";
    }
    
    public UserBusinessException(String errorCode, String message) {
        super(message);
        this.errorCode = errorCode;
    }
    
    public UserBusinessException(String message, Throwable cause) {
        super(message, cause);
        this.errorCode = "USER_ERROR";
    }
    
    public UserBusinessException(String errorCode, String message, Throwable cause) {
        super(message, cause);
        this.errorCode = errorCode;
    }
    
    public String getErrorCode() {
        return errorCode;
    }
}
